<template>
  <div class="m-account">
    <!-- 总资产 -->
    <div class="m-account-all">
      <div class="m-all-item">
        <span class="title">总资产</span>
        <br>
        <span class="all">0.00</span>
      </div>
      <div class="m-all-item">
        <div class="btn-option" style="margin-bottom: 16px;">
          <w-button type="main" @on-click="jumpPage('push')">充值</w-button>
        </div>
        <div class="btn-option">
          <w-button type="primary" @on-click="jumpPage('pull')">提现</w-button>
        </div>
      </div>
      <div class="m-all-item">
        <span class="title">冻结金额(元)</span>
        <br>
        <span class="other">0.00</span>
      </div>
      <div class="m-all-item">
        <span class="title">可用金额(元)</span>
        <br>
        <span class="other">0.00</span>
      </div>
    </div>
    <!-- 账户资产 -->
    <div class="m-account-money">
      <p class="m-title">账户资产</p>
      <div class="m-a-m">
        <div class="m-a-m-item">
          <span class="m-a-m-money">0.00</span>
          <br>
          <span class="m-a-m-title">账户总资产(元)</span>
        </div>
        <div class="m-a-m-item">
          <span>=</span>
        </div>
        <div class="m-a-m-item">
          <span class="m-a-m-money">0.00</span>
          <br>
          <span class="m-a-m-title">账户余额(元)</span>
        </div>
        <div class="m-a-m-item">
          <span>+</span>
        </div>
        <div class="m-a-m-item">
          <span class="m-a-m-money">0.00</span>
          <br>
          <span class="m-a-m-title">待回收投资(元)</span>
        </div>
        <div class="m-a-m-item">
          <span>+</span>
        </div>
        <div class="m-a-m-item">
          <span class="m-a-m-money">0.00</span>
          <br>
          <span class="m-a-m-title">待收收益(元)</span>
        </div>
      </div>
    </div>
    <!-- 投资账户 -->
    <div class="m-touzi">
      <p class="m-title">账户资产</p>
      <div class="account-list">
        <w-table :columns="columns">
          <tr>
            <td>
              <p>投融宝FXZQ201808388</p>
            </td>
            <td>
              <span>80.00</span>
            </td>
            <td>
              <span>80.00</span>
            </td>
            <td>
              <span>80.00</span>
            </td>
            <td>
              <span>80.00</span>
            </td>
            <td>
              <span>12</span>
            </td>
            <td>
              <span>2019-08-21</span>
            </td>
          </tr>
        </w-table>
      </div>
      <div style="margin-top: 30px">
        <w-paging></w-paging>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      columns: [
        {title: '项目名称', width: 'auto'},
        {title: '待收金额(元)', width: 'auto'},
        {title: '待收本金(元)', width: 'auto'},
        {title: '待收利息(元)', width: 'auto'},
        {title: '管理费(元)', width: 'auto'},
        {title: '期数', width: 'auto'},
        {title: '待收日期', width: 'auto'}
      ]
    }
  },
  methods: {
    /**
     * 跳转
     */
    jumpPage(type) {
      this.$toast('该功能暂未开放...')
      return
      if (type == 'push') {
        this.$router.push('/my/recharge/push')
      } else if (type == 'pull') {
        this.$router.push('/my/recharge/pull')
      }
    }
  }
}
</script>

<style lang="scss">
.m-account-all {
  .btn-option {
    .btn {
      width: 60px;
      height: 30px;
    }
  }
}
.m-touzi {
  table {
    th {
      background-color: #FAFAFA;
    }
  }
}
</style>

<style lang="scss" scoped>
.m-account {
  // padding-bottom: 30px;
}

.m-title {
  font-size: 16px;
  margin: 20px 0; 
  font-weight: bold;
}
.m-account-all {
  position: relative;
  width: 990px;
  margin: -20px -20px 0;
  height: 152px;
  padding: 34px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url(../../assets/my/my_bg_1.png) no-repeat;
  .m-all-item {
    flex: 1;
    span {
      position: absolute;
      display: inline-block;
    }
    .title {
      top: 34px;
      font-size: 16px;
    }
    .all {
      bottom: 34px;
      font-size: 32px;
    }
    .other {
      bottom: 34px;
      font-size: 24px;
    }
  }
}
.m-account-money {
  .m-a-m {
    padding: 12px 20px;
    height:80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background:rgba(247,248,250,1);
  }
  .m-a-m-item {
    flex: 1;
    span {
      line-height: 28px;
    }
    .m-a-m-money {
      font-size: 16px;
    }
    .m-a-m-title {
      color: #878787;
    }
  }
}
</style>
